﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZFine.Code
{
    public static class PubClass
    {
        /// <summary>
        /// 最小日期 设置为1900-01-01
        /// </summary>
        public static DateTime MinDate()
        {
            return new DateTime(1900,1,1);
        }

        /// <summary>
        /// yyyy-MM-dd
        /// </summary>
        public static string DateFormat
        {
            get { return "yyyy-MM-dd"; }
        }
        /// <summary>
        /// yyyyMMdd
        /// </summary>
        public static string DateFormat2
        {
            get { return "yyyyMMdd"; }
        }

        /// <summary>
        /// yyyy年MM月dd日
        /// </summary>
        public static string DateFormatChinese
        {
            get { return "yyyy年MM月dd日"; }
        }
        /// <summary>
        /// yyyy-MM-dd HH:mm:ss
        /// </summary>
        public static string TimeFormat
        {
            get { return "yyyy-MM-dd HH:mm:ss"; }
        }
        /// <summary>
        /// yyyyMMddHHmmss
        /// </summary>
        public static string TimeFormat2
        {
            get { return "yyyyMMddHHmmss"; }
        }
        /// <summary>
        /// yyyyMM
        /// </summary>
        public static string DateFormatYearMonth
        {
            get { return "yyyyMM"; }
        }

        /// <summary>
        /// 验证是否为数字
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public static bool IsNumber(string str)
        {
            try
            {
                Convert.ToDouble(str);
                return true;
            }
            catch
            {
                return false;
            }
        }

        public static string videoPath = "upload/GasClient/camera/video";
        public static string imagesPath = "upload/GasClient/camera/images";
        public static string faceRegPath = "upload/face";

    }
}
